
import { SUCCESS_CODE } from '@/constants'

const timeout = 1000

const adminList = [
  {
    path: '/dashboard',
    component: '#',
    redirect: '/dashboard/index',
    name: 'Dashboard',
    meta: {
      title: '首页',
      icon: 'vi-ant-design:dashboard-filled'
    },
    children: [
      {
        path: 'index',
        component: 'views/Dashboard/index',
        name: 'Index',
        meta: {
          title: '首页',
          icon: 'vi-ant-design:dashboard-filled',
          breadcrumb: false,
          canTo: false,
          noBreadcrumb: true
        }
      },
      {
        // 消息
        path: 'message',
        component: 'views/Dashboard/Message/index',
        name: 'Message',
        meta: {
          hidden: true,
          title: '消息',
          icon: 'vi-ant-design:message-filled',
          activeMenu: '/dashboard/index',
          breadcrumb: true,
          canTo: true 
        }
      }
    ]
  },
  {
    path: '/demo',
    component: '#',
    redirect: '/demo/demoIndex',
    name: 'Demo',
    meta: {
    },
    children: [
      {
        path: 'demoIndex',
        component: 'views/Demo/index',
        name: 'DemoIndex',
        meta: {
          title: '组件测试demo',
          icon: 'vi-ant-design:dashboard-filled',
          noCache: true,
          affix: true
        }
      }
    ]
  },
  {
    // 商户管理
    path : '/merchantManagement',
    component: '#',
    redirect: '/merchantManagement/merchantEntry/index',
    name: 'MerchantManagement',
    meta: {
      title: '商户管理',
      icon: 'vi-bx:bxs-component',
      alwaysShow: true
    },
    children: [
      // 商户入驻
      {
        path: 'merchantEntry',
        component: 'views/MerchantManagement/merchantEntry/index',
        name: 'MerchantEntry',
        meta: {
          title: '商户入驻'
        }
      },
      // 商户列表
      {
        path: 'merchantList',
        component: 'views/MerchantManagement/merchantList/index',
        name: 'MerchantList',
        meta: {
          title: '商户列表'
        }
      },

    ]
  },
  {
    path: '/level',
    component: '#',
    redirect: '/level/menu1/menu1-1/menu1-1-1',
    name: 'Level',
    id: 6,
    type: 0,
    parentId: undefined,
    title: '菜单',
    meta: {
      title: '菜单',
      icon: 'vi-carbon:skill-level-advanced'
    },
    children: [
      {
        path: 'menu1',
        name: 'Menu1',
        component: '##',
        id: 7,
        type: 0,
        parentId: 6,
        title: '菜单1',
        redirect: '/level/menu1/menu1-1/menu1-1-1',
        meta: {
          title: '菜单1'
        },
        children: [
          {
            path: 'menu1-1',
            name: 'Menu11',
            component: '##',
            id: 8,
            type: 0,
            parentId: 7,
            title: '菜单1-1',
            redirect: '/level/menu1/menu1-1/menu1-1-1',
            meta: {
              title: '菜单1-1',
              alwaysShow: true
            },
            children: [
              {
                path: 'menu1-1-1',
                name: 'Menu111',
                component: 'views/Level/Menu111',
                id: 9,
                type: 1,
                parentId: 8,
                title: '菜单1-1-1',
                meta: {
                  title: '菜单1-1-1'
                }
              }
            ]
          },
          {
            path: 'menu1-2',
            name: 'Menu12',
            component: 'views/Level/Menu12',
            id: 10,
            type: 1,
            parentId: 7,
            title: '菜单1-2',
            meta: {
              title: '菜单1-2'
            }
          }
        ]
      },
      {
        path: 'menu2',
        name: 'Menu2Demo',
        component: 'views/Level/Menu2',
       
        id: 11,
        type: 1,
        parentId: 6,
        title: '菜单2',
        meta: {
          title: '菜单2'
        }
      }
    ]
  },
  // 多级菜单
  {
    path: '/components',
    component: '#',
    redirect: '/components/form/default-form',
    name: 'ComponentsDemo',
    meta: {
      title: 'router.component',
      icon: 'vi-bx:bxs-component',
      alwaysShow: true
    },
    children: [
      {
        path: 'form',
        component: '##',
        name: 'Form',
        meta: {
          title: 'router.form',
          alwaysShow: true
        },
        children: [
          {
            path: 'default-form',
            component: 'views/Components/Form/DefaultForm',
            name: 'DefaultForm',
            meta: {
              title: 'router.defaultForm'
            }
          },
          {
            path: 'use-form',
            component: 'views/Components/Form/UseFormDemo',
            name: 'UseForm',
            meta: {
              title: 'UseForm'
            }
          }
        ]
      },
      {
        path: 'table',
        component: '##',
        redirect: '/components/table/default-table',
        name: 'TableDemo',
        meta: {
          title: 'router.table',
          alwaysShow: true
        },
        children: [
          {
            path: 'default-table',
            component: 'views/Components/Table/DefaultTable',
            name: 'DefaultTable',
            meta: {
              title: 'router.defaultTable'
            }
          },
          {
            path: 'use-table',
            component: 'views/Components/Table/UseTableDemo',
            name: 'UseTable',
            meta: {
              title: 'UseTable'
            }
          },
          {
            path: 'tree-table',
            component: 'views/Components/Table/TreeTable',
            name: 'TreeTable',
            meta: {
              title: 'TreeTable'
            }
          },
          {
            path: 'table-image-preview',
            component: 'views/Components/Table/TableImagePreview',
            name: 'TableImagePreview',
            meta: {
              title: 'router.PicturePreview'
            }
          },
          {
            path: 'table-video-preview',
            component: 'views/Components/Table/TableVideoPreview',
            name: 'TableVideoPreview',
            meta: {
              title: 'router.tableVideoPreview'
            }
          },
          {
            path: 'card-table',
            component: 'views/Components/Table/CardTable',
            name: 'CardTable',
            meta: {
              title: 'router.cardTable'
            }
          }
        ]
      },
      {
        path: 'editor-demo',
        component: '##',
        redirect: '/components/editor-demo/editor',
        name: 'EditorDemo',
        meta: {
          title: 'router.editor',
          alwaysShow: true
        },
        children: [
          {
            path: 'editor',
            component: 'views/Components/Editor/Editor',
            name: 'Editor',
            meta: {
              title: 'router.richText'
            }
          },
          {
            path: 'json-editor',
            component: 'views/Components/Editor/JsonEditor',
            name: 'JsonEditor',
            meta: {
              title: 'router.jsonEditor'
            }
          },
          {
            path: 'code-editor',
            component: 'views/Components/Editor/CodeEditor',
            name: 'CodeEditor',
            meta: {
              title: 'router.codeEditor'
            }
          }
        ]
      },
      {
        path: 'search',
        component: 'views/Components/Search',
        name: 'Search',
        meta: {
          title: 'router.search'
        }
      },
      {
        path: 'descriptions',
        component: 'views/Components/Descriptions',
        name: 'Descriptions',
        meta: {
          title: 'router.descriptions'
        }
      },
      {
        path: 'image-viewer',
        component: 'views/Components/ImageViewer',
        name: 'ImageViewer',
        meta: {
          title: 'router.imageViewer'
        }
      },
      {
        path: 'dialog',
        component: 'views/Components/Dialog',
        name: 'Dialog',
        meta: {
          title: 'router.dialog'
        }
      },
      {
        path: 'icon',
        component: 'views/Components/Icon',
        name: 'Icon',
        meta: {
          title: 'router.icon'
        }
      },
      {
        path: 'icon-picker',
        component: 'views/Components/IconPicker',
        name: 'IconPicker',
        meta: {
          title: 'router.iconPicker'
        }
      },
      {
        path: 'echart',
        component: 'views/Components/Echart',
        name: 'Echart',
        meta: {
          title: 'router.echart'
        }
      },
      {
        path: 'count-to',
        component: 'views/Components/CountTo',
        name: 'CountTo',
        meta: {
          title: 'router.countTo'
        }
      },
      {
        path: 'qrcode',
        component: 'views/Components/Qrcode',
        name: 'Qrcode',
        meta: {
          title: 'router.qrcode'
        }
      },
      {
        path: 'highlight',
        component: 'views/Components/Highlight',
        name: 'Highlight',
        meta: {
          title: 'router.highlight'
        }
      },
      {
        path: 'infotip',
        component: 'views/Components/Infotip',
        name: 'Infotip',
        meta: {
          title: 'router.infotip'
        }
      },
      {
        path: 'input-password',
        component: 'views/Components/InputPassword',
        name: 'InputPassword',
        meta: {
          title: 'router.inputPassword'
        }
      },
      {
        path: 'waterfall',
        component: 'views/Components/Waterfall',
        name: 'Waterfall',
        meta: {
          title: 'router.waterfall'
        }
      },
      {
        path: 'image-cropping',
        component: 'views/Components/ImageCropping',
        name: 'ImageCropping',
        meta: {
          title: 'router.imageCropping'
        }
      },
      {
        path: 'video-player',
        component: 'views/Components/VideoPlayer',
        name: 'VideoPlayer',
        meta: {
          title: 'router.videoPlayer'
        }
      },
      {
        path: 'avatars',
        component: 'views/Components/Avatars',
        name: 'Avatars',
        meta: {
          title: 'router.avatars'
        }
      },
      {
        path: 'i-agree',
        component: 'views/Components/IAgree',
        name: 'IAgree',
        meta: {
          title: 'router.iAgree'
        }
      },
      {
        path: 'tree',
        component: 'views/Components/Tree',
        name: 'Tree',
        meta: {
          title: 'router.tree'
        }
      }
    ]
  },
  {
    path: '/error',
    component: '#',
    redirect: '/error/404',
    name: 'Error',
    meta: {
      title: 'router.errorPage',
      icon: 'vi-ci:error',
      alwaysShow: true
    },
    children: [
      {
        path: '404-demo',
        component: 'views/Error/404',
        name: '404Demo',
        meta: {
          title: '404'
        }
      },
      {
        path: '403-demo',
        component: 'views/Error/403',
        name: '403Demo',
        meta: {
          title: '403'
        }
      },
      {
        path: '500-demo',
        component: 'views/Error/500',
        name: '500Demo',
        meta: {
          title: '500'
        }
      }
    ]
  },

]

export default [
  // 列表接口
  {
    url: '/mock/role/list',
    method: 'get',
    timeout,
    response: () => {
      return {
        code: SUCCESS_CODE,
        data: adminList
      }
    }
  },
]
